Optimal. Leaf size=108 \[ \frac {\tan (c+d x)}{d \sqrt {a \cos (c+d x)+a}}-\frac {\tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a \cos (c+d x)+a}}\right )}{\sqrt {a} d}+\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a \cos (c+d x)+a}}\right )}{\sqrt {a} d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.21, antiderivative size = 108, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {2779, 2985, 2649, 206, 2773} \[ \frac {\tan (c+d x)}{d \sqrt {a \cos (c+d x)+a}}-\frac {\tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a \cos (c+d x)+a}}\right )}{\sqrt {a} d}+\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a \cos (c+d x)+a}}\right )}{\sqrt {a} d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 2649
Rule 2773
Rule 2779
Rule 2985
Rubi steps
\begin {align*} \int \frac {\sec ^2(c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx &=\frac {\tan (c+d x)}{d \sqrt {a+a \cos (c+d x)}}-\frac {\int \frac {(a-a \cos (c+d x)) \sec (c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx}{2 a}\\ &=\frac {\tan (c+d x)}{d \sqrt {a+a \cos (c+d x)}}-\frac {\int \sqrt {a+a \cos (c+d x)} \sec (c+d x) \, dx}{2 a}+\int \frac {1}{\sqrt {a+a \cos (c+d x)}} \, dx\\ &=\frac {\tan (c+d x)}{d \sqrt {a+a \cos (c+d x)}}+\frac {\operatorname {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{d}-\frac {2 \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{d}\\ &=-\frac {\tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{\sqrt {a} d}+\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \cos (c+d x)}}\right )}{\sqrt {a} d}+\frac {\tan (c+d x)}{d \sqrt {a+a \cos (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 27.56, size = 1540, normalized size = 14.26 \[ \text {result too large to display} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.90, size = 236, normalized size = 2.19 \[ \frac {{\left (\cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} + 4 \, \sqrt {a \cos \left (d x + c\right ) + a} \sqrt {a} {\left (\cos \left (d x + c\right ) - 2\right )} \sin \left (d x + c\right ) + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right ) + \frac {2 \, \sqrt {2} {\left (a \cos \left (d x + c\right )^{2} + a \cos \left (d x + c\right )\right )} \log \left (-\frac {\cos \left (d x + c\right )^{2} - \frac {2 \, \sqrt {2} \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{\sqrt {a}} - 2 \, \cos \left (d x + c\right ) - 3}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right )}{\sqrt {a}} + 4 \, \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{4 \, {\left (a d \cos \left (d x + c\right )^{2} + a d \cos \left (d x + c\right )\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 2.71, size = 290, normalized size = 2.69 \[ -\frac {\sqrt {2} {\left (\frac {\sqrt {2} \sqrt {a} \log \left (\frac {{\left | 2 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} - 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}{{\left | 2 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} + 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}\right )}{{\left | a \right |}} + \frac {2 \, \log \left ({\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2}\right )}{\sqrt {a}} - \frac {8 \, {\left (3 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} \sqrt {a} - a^{\frac {3}{2}}\right )}}{{\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{4} - 6 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} a + a^{2}}\right )}}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.67, size = 466, normalized size = 4.31 \[ \frac {\cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (-2 a \left (2 \sqrt {2}\, \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+4 a}{\cos \left (\frac {d x}{2}+\frac {c}{2}\right )}\right )-\ln \left (-\frac {4 \left (\sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}-a \sqrt {2}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+2 a \right )}{-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {2}}\right )-\ln \left (\frac {4 \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}+4 a \sqrt {2}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+8 a}{2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {2}}\right )\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 \sqrt {2}\, \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+4 a}{\cos \left (\frac {d x}{2}+\frac {c}{2}\right )}\right ) a +2 \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}-\ln \left (-\frac {4 \left (\sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}-a \sqrt {2}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+2 a \right )}{-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {2}}\right ) a -\ln \left (\frac {4 \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}+4 a \sqrt {2}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+8 a}{2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {2}}\right ) a \right )}{a^{\frac {3}{2}} \left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-\sqrt {2}\right ) \left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {1}{{\cos \left (c+d\,x\right )}^2\,\sqrt {a+a\,\cos \left (c+d\,x\right )}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec ^{2}{\left (c + d x \right )}}{\sqrt {a \left (\cos {\left (c + d x \right )} + 1\right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________